
import FireballMaterialShader from "../shader/fire/FireballMaterialShader.glsl?raw";
import FireLightMaterialShader from "../shader/fire/FireLightMaterialShader.glsl?raw";
import HotWheelMaterialShader from "../shader/fire/HotWheelMaterialShader.glsl?raw";
import FireBorderMaterShader from "../shader/fire/FireBorderMaterShader.glsl?raw";

/**
 *  火球
 */

Cesium.Material.FireballMaterialType = 'Fireball'
Cesium.Material._materialCache.addMaterial(Cesium.Material.FireballMaterialType, {
  fabric: {
    type: Cesium.Material.FireballMaterialType,
    uniforms: {
      speed :1.0
    },
    source: FireballMaterialShader
  },
  translucent: function (material) {
    return true
  }
})


/**
 * 发光火面
 */

Cesium.Material.FireLightMaterialType = 'FireLight'
Cesium.Material._materialCache.addMaterial(Cesium.Material.FireLightMaterialType, {
  fabric: {
    type: Cesium.Material.FireballMateFireLightMaterialTyperialType,
    uniforms: {
      speed :1.0
    },
    source: FireLightMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
 * 风火轮
 */

import iChannel0 from '../image/fire/iChannel0.png'

Cesium.Material.HotWheelMaterialType = 'HotWheel'
Cesium.Material._materialCache.addMaterial(Cesium.Material.HotWheelMaterialType, {
  fabric: {
    type: Cesium.Material.HotWheelMaterialType,
    uniforms: {
      speed :1.0,
      iChannel0
    },
    source: HotWheelMaterialShader
  },
  translucent: function (material) {
    return true
  }
})

/**
 * 火边框
 */

Cesium.Material.FireBorderMaterialType = 'FireBorder'
Cesium.Material._materialCache.addMaterial(Cesium.Material.FireBorderMaterialType, {
  fabric: {
    type: Cesium.Material.FireBorderMaterialType,
    uniforms: {
      speed :1.0,
      color : Cesium.Color.AQUA
    },
    source: FireBorderMaterShader
  },
  translucent: function (material) {
    return true
  }
})



